package com.fzhucc.modules.lesson.repository;

import com.fzhucc.modules.lesson.domain.LessonIntegral;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
* @website https://eladmin.vip
* @author yyg
* @date 2022-12-07
**/
public interface LessonIntegralRepository extends JpaRepository<LessonIntegral, Integer>, JpaSpecificationExecutor<LessonIntegral> {

    @Query("SELECT a from LessonIntegral as a where a.userId=:userId")
    LessonIntegral findByUserId(Long userId);
}